package com.practicario.mvc.controller
{
	import com.practicario.mvc.model.ServicesProxy;
	import com.practicario.mvc.model.vo.TeacherProfileVO;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
    
    public class UpdatePerfilCommand extends SimpleCommand implements ICommand
    {
        override public function execute(note:INotification):void    
        {
        	facade.registerProxy( new ServicesProxy());
        	var proxy:ServicesProxy = facade.retrieveProxy(ServicesProxy.NAME) as ServicesProxy;
        	var teacherProfileVO:TeacherProfileVO = note.getBody() as TeacherProfileVO;
        	proxy.updateProfile(teacherProfileVO);
        }
    }
}